<?php slot('js_insideLoadFunction')?>
ADMIN_FORM.init();
<?php end_slot()?>
<div class="box-navigation">
	<?php echo $data['navigation']?>
</div>
<div class="clr"></div>
<div class="box-content">
	<form action="?action_name=<?php echo $data['action']?>" method="post" name="form_main" id="form_main">
		<?php echo $form['_csrf_token']?>
		<div class="clr"></div>
		<div class="box-content-main ">
			<div class="message"><?php echo empty($data['result'])?'':$data['result']?></div><div class="note"><?php echo __('is_require',null, 'table_list')?></div>
			<div class="clr"></div>
			<table class="table-list table-form" cellspacing="0" cellpadding="0" border="0">
				
				<tr class="class1">
					<td class="label"><?php echo __('label_name',null,'foreign_language_languages')?><span class="required">*</span></td>
					<td class="input">
						<?php echo $form['language_name']->render(array('class'=>'form-text required', 'data-require'=> 'not-empty'))?>
						<span class="error" id="type_error"><?php echo __('not_empty', null, 'table_list')?></span>
					</td>
					
				</tr>
				<tr class="class1">
					<td class="label"><?php echo __('label_multi_level',null,'foreign_language_languages')?></td>
					<td class="input">
						<?php 
						$count_all_loop = count($data['child']['level_list']);
						$colums = 3;
						$count_for_loop = ceil($count_all_loop / $colums);?>
						<?php for($i = 0; $i < $colums; $i++): ?>
						<div style="float: left; width: 125px;">
						<?php for($j = $i * $count_for_loop; $j < $count_all_loop && $j < ($i+1)* $count_for_loop; $j++):
						$per = $data['child']['level_list'][$j];
						?>
						<input type="checkbox" class="promotion" <?php echo $data['child']['levels'][$per['id']]?> value="<?php echo $per['id']?>" name="levels[]"/><label><?php echo $per['name']?></label><br/>
						
						
						<?php 
							endfor; ?>
						</div>
							<?php 
						endfor;?>
						<div class="clr"></div>
					</td>
				</tr>
				<tr class="class1">
					<td class="label"><?php echo __('label_description',null,'foreign_language_languages')?></td>
					<td class="input">
						<?php echo $form['description']->render()?>
					</td>
				</tr>
				
				<tr class="class1" style="display: none">
					<td class="label"><?php echo __('is_enabled',null,'table_list')?></td>
					<td class="input"><?php echo $form['is_enabled']->render(array('class'=>'required'))?></td>
					
				</tr>
				<tr class="class1" style="background:#fff">
					<td class="label">&nbsp;</td>
					<td class="input"><input type="button" data-error="<?php echo __('submit_error', null, 'table_list')?>" id="button_submit" name="button_submit" class="button" value="<?php echo $data['button_action']?>"/></td>
					
				</tr>
			</table>
		</div>
		<div class="clr"></div>
		<div class="control-back"><a href="<?php echo $data['redirect']?>" title="<?php echo __('control_back', null, 'table_list')?>" alt="<?php echo __('control_back', null, 'table_list')?>"><?php echo __('control_back', null, 'table_list')?></a></div>
	</form>
</div>